#pragma once

#include "MapLayer.h"
#include <ogr_api.h>
#include <atlstr.h>
#include "UnitType.h"
#include "PointGeometry.h"

class sqlite3;
class CDrawer;
class CVectorDataProvider;

class CVectorLayer:public CMapLayer
{
friend class CVectorDataProvider;
public:
	CVectorLayer();
	~CVectorLayer();
	bool draw(CDrawer* pDrawer);
	
private:
	//void setDataProvider( CString & provider);
	//void setCoordinate();
	//bool createCoordinateFromWkt(char * theWkt,OGRSpatialReferenceH crs);
	//bool createCoordinateFromDb(CString dbFile, char* field, char* value, OGRSpatialReferenceH crs);
	//bool openDB(CString databasePath, sqlite3 **db);
	//bool createFromSrsId(CString srsId);
	//bool setMapUnit();
	//void setDbFile(CString srsDbFilePath, CString userDbFilePath){mSrsDbFilePath = srsDbFilePath; mUserDbFilePath = userDbFilePath;};
	void drawGeometrys(CDrawer* pDrawer);
	void drawGeometry(CDrawer* pDrawer, OGRFeatureH feature); 
	UnitType m_unitType;
	OGRwkbGeometryType m_geomType;
	int m_geometryCount;
	CArray<CGeometry*>* m_geometries;
};
